﻿using System.Collections.Generic;
using EnetaMvc.Core.Domain.Forums;
using EnetaMvc.Infrastructure;

namespace EnetaMvc.Core.Repositories
{
    public interface IForumRepository
    {
        ForumPost GetLastPostForForum(long id);
        IList<ForumCategory> ListForumCategories();
        ForumCategory GetForumCategoryById(long id);
        long GetTopicCountInForum(long forumId);
        long GetPostCountInForum(long forumId);
        void SaveForumCategory(ForumCategory category);
        void DeleteForumCategory(ForumCategory category);
        void SaveForum(Forum forum);
        void DeleteForum(Forum forum);
        void DeleteForumPost(ForumPost forum);

        Forum GetForumById(long id);
        Forum GetForumByPostId(long id);
        PagedResult<ForumPost> ListPostsForForum(long id, int page, int pageSize);
        ForumPost GetForumPostById(long id);
        void SaveForumPost(ForumPost post);
        IList<ForumPost> ListLastTopicsForRss();
        IList<ForumPost> ListLastRepliesForRss();
        IList<ForumPost> ListLastTopicsForCategoryRss(long categoryId);
        IList<ForumPost> ListPostsOverForumsExclusive(long[] excludeCategoryIds, int resultCount);
    }
}